import Axios from "./../utils/axios";
import api from "@/api";

// 获取系统首页的数据
function getHomeInfo() {
    return Axios.post(api.home.getHomeInfo)
}

// 修改账户信息
function updateUser(userId, userName, nickName, email, phonenumber, password) {
    return Axios.post(api.home.updateUser, {
        userId, userName, nickName, email, phonenumber, password    
    })
}

// 获取登录日志（分页）
function getLoginLog(currentPage, pageSize) {
    console.log('indexService的currentPage,pageSize', currentPage, pageSize);
    return Axios.post(api.home.getLoginLog, JSON.stringify({ currentPage, pageSize })
    )
}


export default {
    getHomeInfo,
    updateUser,
    getLoginLog
}